<div class="container">    
	<div id="signupbox" class="row">
		<div class="panel panel-info">
			<div class="panel-heading">
				<div class="panel-title">New to Speedhost? Let’s create you an account</div>
			</div>  
			<div class="panel-body" >
				<?php if($response):?>
				<div class="alert alert-danger alert-dismissable">
					<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
					<?php echo $response; ?>
				</div>
				<?php endif;?>
				<?php echo form_open(null, 'id="registerform" class="form-horizontal"'); ?>
					<div class="row">
						<div class="col-md-6">
							<h4>Organization (or Individual) Information</h4>
							<div class="speedhost-block" >
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Organization Name </label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="RegistrantOrganizationName" id="RegistrantOrganizationName" value="<?=$RegistrantOrganizationName?>" placeholder="Organization Name">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Name (first/last) <span class="glyphicon glyphicon-star red-color"></span></label>
									<div class="col-md-4">
										<input type="text" class="form-control" name="RegistrantFirstName" id="RegistrantFirstName" value="<?=$RegistrantFirstName?>" placeholder="First Name">
									</div>
									<div class="col-md-4">
										<input type="text" class="form-control" name="RegistrantLastName" id="RegistrantLastName" value="<?=$RegistrantLastName?>" placeholder="last Name">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Role/Title <span class="glyphicon glyphicon-star blue-color"></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="RegistrantJobTitle" id="RegistrantJobTitle" value="<?=$RegistrantJobTitle?>" placeholder="Role/Title">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Postal Address Line 1  <span class="glyphicon glyphicon-star red-color"></span></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="RegistrantAddress1" id="RegistrantAddress1" value="<?=$RegistrantAddress1?>" placeholder="Postal Address Line 1">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Postal Address Line 2 </label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="RegistrantAddress2" id="RegistrantAddress2" value="<?=$RegistrantAddress2?>" placeholder="Postal Address Line 2">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">City <span class="glyphicon glyphicon-star red-color"></span></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="RegistrantCity" id="RegistrantCity" value="<?=$RegistrantCity?>" placeholder="City">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">State <span class="glyphicon glyphicon-star red-color"></span></label>
									<div class="col-md-4">
										 <input type="radio" value="S" name="RegistrantStateProvinceChoice" <?php if($RegistrantStateProvinceChoice=="S") echo "checked='checked'";?>> US State
									</div>
									<div class="col-md-4">
										<input type="radio" value="P" name="RegistrantStateProvinceChoice" <?php if($RegistrantStateProvinceChoice=="P") echo "checked='checked'";?>> Province
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">&nbsp;</label>
									<div class="col-md-4">
										<select class="form-control" name="RegistrantState" id="RegistrantState">
											<?php foreach($us_states as $states){?>
											<option value="<?=$states['code']?>" <?php if($RegistrantState==$states['code']) echo "selected='selected'";?>><?=$states['name']?></option>
											<?}?>
										</select>
									</div>
									<div class="col-md-4">
										<input type="text" class="form-control" name="RegistrantProvince" id="RegistrantProvince" value="<?=$RegistrantProvince?>" placeholder="Province" disabled>
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Postal or Zip Code <span class="glyphicon glyphicon-star red-color"></span></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="RegistrantPostalCode" id="RegistrantPostalCode" value="<?=$RegistrantPostalCode?>" placeholder="Postal or Zip Code">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Country <span class="glyphicon glyphicon-star red-color"></span></label>
									<div class="col-md-8">
										<select class="form-control" name="RegistrantCountry">
											<option value="">Select Country</option>
											<?php foreach($countries as $country){?>
											<option value="<?=$country['name']?>" <?php if($RegistrantCountry==$country['name']) echo "selected='selected'";?>><?=$country['name']?></option>
											<?}?>
										</select>
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Email Address (WhoIs) <span class="glyphicon glyphicon-star red-color"></span><br/><small>(will be displayed in your public WhoIs Information)</small></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="RegistrantEmailAddress" id="RegistrantEmailAddress" value="<?=$RegistrantEmailAddress?>" placeholder="Email Address (WhoIs)">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Email Address (account) <small>(will be used to contact you about your account)</small></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="RegistrantEmailAddress_Contact" id="RegistrantEmailAddress_Contact" value="<?=$RegistrantEmailAddress_Contact?>" placeholder="Email Address (account)">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Telephone <span class="glyphicon glyphicon-star red-color"></span></label>
									<div class="col-md-4">
										<select class="form-control" name="RegistrantPhonecode">
											<?php foreach($countries as $country){?>
											<option value="<?=$country['phone_code']?>" <?php if($RegistrantPhonecode==$country['phone_code']) echo "selected='selected'";?>><?=$country['name'].'(+ '.$country['phone_code'].')'?></option>
											<?}?>
										</select>
									</div>
									<div class="col-md-4">
										<input type="text" class="form-control" name="RegistrantPhone" id="RegistrantPhone" value="<?=$RegistrantPhone?>" placeholder="Telephone">
									</div>
								</div><div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Fax </label>
									<div class="col-md-4">
										<select class="form-control" name="RegistrantFaxcode">
											<?php foreach($countries as $country){?>
											<option value="<?=$country['phone_code']?>" <?php if($RegistrantFaxcode==$country['phone_code']) echo "selected='selected'";?>><?=$country['name'].'(+ '.$country['phone_code'].')'?></option>
											<?}?>
										</select>
									</div>
									<div class="col-md-4">
										<input type="text" class="form-control" name="RegistrantFax" id="RegistrantFax" value="<?=$RegistrantFax?>" placeholder="Fax">
									</div>
								</div>
							</div>
						</div>
						<div class="col-md-6">
							<h4>Login ID and Password Information</h4>
							<div class="speedhost-block" >
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Choose a Login ID <span class="glyphicon glyphicon-star red-color"></span><br><small>(no spaces or special symbols are accepted)</small></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="newuid" id="newuid" value="<?=$newuid?>" placeholder="Choose a Login ID">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Choose a Password <span class="glyphicon glyphicon-star red-color"></span><br><small>(use at least 6 characters)</small></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="newpw" id="newpw" placeholder="Choose a Password">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Confirm the Password <span class="glyphicon glyphicon-star red-color"></span><br><small>(re-type the password)</small></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="confirmpw" id="confirmpw" placeholder="Confirm the Password">
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Secret Question <span class="glyphicon glyphicon-star red-color"></span><br><small>(if you lose the password)</small></label>
									<div class="col-md-8">
										<select class="form-control" name="AuthQuestionType">
											<option value="fteach" <?php if($AuthQuestionType=="fteach") echo "selected='selected'";?>>Favorite Teacher</option>
											<option value="fvspot" <?php if($AuthQuestionType=="fvspot") echo "selected='selected'";?>>Favorite Vacation Spot</option>
											<option value="fpet" <?php if($AuthQuestionType=="fpet") echo "selected='selected'";?>>Favorite Pet</option>
											<option value="fmovie" <?php if($AuthQuestionType=="fmovie") echo "selected='selected'";?>>Favorite Movie</option>
											<option value="fbook" <?php if($AuthQuestionType=="fbook") echo "selected='selected'";?>>Favorite Book</option>
										</select>
									</div>
								</div>
								<div class="form-group">
									<label for="firstname" class="col-md-4 control-label">Secret Answer <span class="glyphicon glyphicon-star red-color"></span></label>
									<div class="col-md-8">
										<input type="text" class="form-control" name="AuthQuestionAnswer" id="AuthQuestionAnswer" value="<?=$AuthQuestionAnswer?>" placeholder="Secret Answer">
									</div>
								</div>
								
							</div>
						</div>
					</div>
					<div style="border-top: 1px solid #999; padding-top:20px;margin-top:10px;"  class="form-group">
						<div class="col-md-offset-5 col-md-7">
							<button type="submit" class="btn btn-success">Register Account</button>
						</div> 
					</div>
				<?php echo form_close(); ?>
			</div>
		</div>
	</div> 
</div>
<script>
$(function(){
	$('input[name=RegistrantStateProvinceChoice]').change(function(){
		var state=$('input[name=RegistrantStateProvinceChoice]:checked').val();
		if(state=="P")
		{
			$("#RegistrantProvince").removeAttr("disabled");
			$("#RegistrantState").attr("disabled","disabled");
		}
		if(state=="S")
		{
			$("#RegistrantState").removeAttr("disabled");
			$("#RegistrantProvince").attr("disabled","disabled");
		}
	});
	
})
</script>
	